package com.company.eos.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.company.eos.domain.AuditLeave;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * @author Song, Wei
 */
@Mapper
@Repository
public interface AuditLeaveMapper extends BaseMapper<AuditLeave> {

    /**
     * 查询请假分页数据
     *
     * @param param
     * @return
     */
    ArrayList<HashMap> searchLeaveByPage(HashMap param);

    /**
     * 查询请假分页数据总数
     *
     * @param param
     * @return
     */
    long searchLeaveCount(HashMap param);

    /**
     * 更新请假instance_id
     *
     * @param param
     * @return
     */
    int updateLeaveInstanceId(HashMap param);

    /**
     * 查询请假记录总数
     *
     * @param param
     * @return
     */
    long searchContradiction(HashMap param);

    /**
     * 查询请假记录的instanceId
     *
     * @param id
     * @return
     */
    int searchFlowIdById(int id);

    /**
     * 删除请假记录
     *
     * @param param
     * @return
     */
    int deleteLeaveById(HashMap param);

    /**
     * 查询请假单
     *
     * @param param
     * @return
     */
    HashMap searchLeaveById(HashMap param);
}




